home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / demos / OpenGL / space / space.h < prev    next >
C/C++ Source or Header  |  1996-11-11  |  19KB  |  609 lines

  1. /*
  2.  * Copyright (C) 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #undef  SP_IRIS_GL
  18. #undef  SP_OPEN_GL
  19. #define SP_OPEN_GL  1
  20.  
  21. typedef char             schar8 ;
  22. typedef unsigned char    uchar8 ;
  23. typedef short            sint16 ;
  24. typedef unsigned short   uint16 ;
  25. typedef long             sint32 ;
  26. typedef unsigned long    uint32 ;
  27. typedef float            flot32 ;
  28. typedef double           flot64 ;
  29.  
  30. #include <stdio.h>
  31. #include <math.h>
  32. #include <string.h>
  33.  
  34. #ifdef SP_OPEN_GL
  35. #include <GL/glx.h>
  36. #include <GL/gl.h>
  37.  
  38. typedef float Matrix[4][4];
  39.  
  40. typedef struct  {
  41.         Display     *dpy;
  42.         sint32      snu;
  43.         XVisualInfo *vis;
  44.         GLXContext  ctx;
  45.         Window      rwi,win;
  46.         uint32      hwid;
  47. } t_wndw;
  48.  
  49. #define SP_IO_esc          0x001b
  50. #define SP_IO_a            0x0061 
  51. #define SP_IO_s            0x0073 
  52. #define SP_IO_x            0x0078 
  53. #define SP_IO_h            0x0068 
  54. #define SP_IO_l            0x006c 
  55. #define SP_IO_v            0x0076 
  56. #define SP_IO_r            0x0072 
  57. #define SP_IO_t            0x0074 
  58. #define SP_IO_y            0x0079 
  59. #define SP_IO_d            0x0064 
  60. #define SP_IO_n            0x006e 
  61. #define SP_IO_z            0x007a 
  62. #define SP_IO_i            0x0069 
  63. #define SP_IO_o            0x006f 
  64. #define SP_IO_q            0x0071 
  65. #define SP_IO_b            0x0062 
  66. #define SP_IO_u            0x0075 
  67. #define SP_IO_pri          0xff61
  68. #define SP_IO_tid          0x002d
  69. #define SP_IO_tco          0xdddd /* xxx */
  70. #define SP_IO_up           0xff52 
  71. #define SP_IO_dwn          0xff54
  72. #define SP_IO_snd          0xeeee /* xxx */
  73. #define SP_IO_0            0x0030 
  74. #define SP_IO_1            0x0031 
  75. #define SP_IO_2            0x0032 
  76. #define SP_IO_3            0x0033 
  77. #define SP_IO_4            0x0034 
  78. #define SP_IO_5            0x0035 
  79. #define SP_IO_6            0x0036 
  80. #define SP_IO_7            0x0037 
  81. #define SP_IO_8            0x0038 
  82. #define SP_IO_9            0x0039 
  83. #define SP_IO_pnt          0x002e
  84. #define SP_IO_com          0x002c
  85. #define SP_IO_ret          0x000d
  86. #define SP_IO_lsh          0x00e1
  87. #define SP_IO_rsh          0x00e2
  88. #define SP_IO_lct          0x00e3
  89. #define SP_IO_rct          0x00e4
  90. #endif
  91.  
  92. #ifdef SP_IRIS_GL
  93. #include <device.h>
  94. #include <gl/gl.h>
  95.  
  96. typedef struct  {
  97.         sint32      wid;
  98.         uint32      hwid;
  99. } t_wndw;
  100.  
  101. #define SP_IO_esc          ESCKEY
  102. #define SP_IO_a            BUT10
  103. #define SP_IO_s            BUT11
  104. #define SP_IO_x            BUT20
  105. #define SP_IO_h            BUT26
  106. #define SP_IO_l            BUT41
  107. #define SP_IO_v            BUT28
  108. #define SP_IO_r            BUT23
  109. #define SP_IO_t            BUT24
  110. #define SP_IO_y            BUT31
  111. #define SP_IO_d            BUT17
  112. #define SP_IO_n            BUT36
  113. #define SP_IO_z            BUT19
  114. #define SP_IO_i            BUT39
  115. #define SP_IO_o            BUT40
  116. #define SP_IO_q            BUT9 
  117. #define SP_IO_b            BUT35
  118. #define SP_IO_u            BUT32
  119. #define SP_IO_pri          BUT157
  120. #define SP_IO_tid          BUT46
  121. #define SP_IO_tco          0xf0
  122. #define SP_IO_up           BUT80
  123. #define SP_IO_dwn          BUT73
  124. #define SP_IO_snd          BUT145
  125. #define SP_IO_0            BUT45
  126. #define SP_IO_1            BUT7 
  127. #define SP_IO_2            BUT13
  128. #define SP_IO_3            BUT14
  129. #define SP_IO_4            BUT21
  130. #define SP_IO_5            BUT22
  131. #define SP_IO_6            BUT29
  132. #define SP_IO_7            BUT30
  133. #define SP_IO_8            BUT37
  134. #define SP_IO_9            BUT38
  135. #define SP_IO_pnt          BUT51
  136. #define SP_IO_com          BUT44
  137. #define SP_IO_ret          BUT50
  138. #define SP_IO_lsh          BUT5 
  139. #define SP_IO_rsh          BUT4 
  140. #define SP_IO_lct          BUT2 
  141. #define SP_IO_rct          BUT144
  142. #endif
  143.  
  144. #define DEBUG_FLAG         0x00000001
  145. #define PRBIT_FLAG         0x00000002
  146. #define MRBIT_FLAG         0x00000004
  147. #define PRINT_FLAG         0x00000008
  148. #define HELPP_FLAG         0x00000010
  149. #define FRACT_FLAG         0x00000020
  150. #define REGEN_FLAG         0x00000040
  151. #define FLSCR_FLAG         0x00000080
  152. #define STNAM_FLAG         0x00000100
  153. #define ECLIP_FLAG         0x00000200
  154. #define RINGW_FLAG         0x00000400
  155. #define SHADE_FLAG         0x00000800
  156. #define VELOC_FLAG         0x00001000
  157. #define PANEL_FLAG         0x00002000
  158. #define NOTXT_FLAG         0x00004000
  159. #define AUTOP_FLAG         0x00008000
  160. #define SPACB_FLAG         0x00010000
  161. #define SHIFT_FLAG         0x00020000
  162. #define TMREV_FLAG         0x00040000
  163. #define CNTRL_FLAG         0x00080000
  164. #define STATS_FLAG         0x00100000
  165. #define ZODAC_FLAG         0x00200000
  166. #define FREEZ_FLAG         0x00400000
  167. #define TEXTR_FLAG         0x00800000
  168. #define NSUBL_FLAG         0x01000000
  169. #define SOUND_FLAG         0x02000000
  170. #define HIRES_FLAG         0x04000000
  171. #define NDPNT_FLAG         0x08000000
  172. #define SLOWZ_FLAG         0x10000000
  173. #define GEOSP_FLAG         0x20000000
  174. #define DPATH_FLAG         0x40000000
  175. #define USERM_FLAG         0x80000000
  176.  
  177. #define ACCUM_FLAG         0x00000000
  178.  
  179. #define HW_AAPNT           0x00000002
  180. #define HW_AALIN           0x00000004
  181. #define HW_TEXTU           0x00000008
  182. #define HW_MMODE           0x00000010
  183. #define HW_FATPT           0x00000020
  184. #define HW_SOUND           0x00000040
  185. #define HW_HIRES           0x00000080
  186. #define HW_MULSA           0x00000100
  187.  
  188. #define SND_BACK           0
  189. #define SND_BUTT           1
  190. #define SND_AUON           2
  191. #define SND_AUOF           3
  192.  
  193. #define SP_HW_RE           0x0001
  194. #define SP_HW_VGX          0x0002
  195. #define SP_HW_GT           0x0004
  196. #define SP_HW_LG           0x0008
  197. #define SP_HW_XG           0x0010
  198. #define SP_HW_PI           0x0020
  199. #define SP_HW_G            0x0040
  200. #define SP_HW_UNKNOWN      0x0080
  201.  
  202. #define SP_LMOUSE          0x0001
  203. #define SP_MMOUSE          0x0002
  204. #define SP_RMOUSE          0x0004
  205.  
  206. #define STELL_STAT         2    /* stellar space */
  207. #define GALAC_STAT         3    /* galactic space */
  208. #define COSMC_STAT         4    /* cosmic space */
  209.  
  210. #define ECLPS_COLR         0xff00ff00    /* eclipse  color */
  211. #define STELL_COLR         0xff0000ff    /* stellar  color */
  212. #define GALAC_COLR         0xffff0000    /* galactic color */
  213. #define COSMC_COLR         0xff00ffff    /* cosmic   color */
  214.  
  215. #define DTOR               (M_PI / 180.0)
  216. #define RTOD               (180.0 / M_PI)
  217. #define I2PI               (0.5 / M_PI)
  218. #define LIGHTSPEED         299792.458
  219. #define GRAV               6.672e-20   /* (km*km*km)/(kg*s*s) */    
  220. #define LN2                log(2.0)
  221. #define EARTHG             0.009808
  222.  
  223. #define AUTOKM             149597870.0
  224. #define KMTOAU             (1.0 / AUTOKM)
  225. #define LYTOAU             63239.7
  226. #define AUTOLY             (1.0 / LYTOAU)
  227. #define PRTOAU             (180.0*3600.0/M_PI)
  228. #define AUTOPR             (1.0 / PRTOAU)
  229. #define PRTOLY             3.261633
  230. #define LYTOPR             (1.0 / PRTOLY)
  231. #define KMTOPR             (KMTOAU*AUTOPR)
  232. #define PRTOKM             (1.0 / KMTOPR)
  233. #define KMTOLY             (KMTOAU*AUTOLY)
  234. #define LYTOKM             (1.0 / KMTOLY)
  235.  
  236. #define GALAXY_EDGE        30000.0
  237. #define STARSQ               256
  238. #define EDGESQ             (GALAXY_EDGE/STARSQ)
  239. #define HEIGHT_ABOVE       (0.005*GALAXY_EDGE*GALAXY_EDGE) 
  240. #define SOLSYS_EDGE        0.02
  241. #define RINGWEDGE          (1.0/200.0)
  242.  
  243. #define SOL_X_GRID         192
  244. #define SOL_Z_GRID         44
  245.  
  246. #define DODO_SIZE           2048
  247. #define NUM_CLIP_PLANES        5
  248. #define NUMBER_OF_STARS     2711
  249. #define ANGULAR_SIZE           0.001
  250.  
  251. #define MAX_ELEV_BYTES     (1024*1024*9)
  252. #define MAX_COLR_BYTES     (1024*1024*1)
  253.  
  254. #define FM_MERC_1B         1 
  255. #define FM_SINU_1B         2 
  256. #define FM_MERC_2B         3 
  257. #define FM_SINU_2B         4 
  258. #define FM_MERC_3B         5 
  259. #define FM_SINU_3B         6 
  260. #define FM_MERC_4B         7 
  261. #define FM_SINU_4B         8 
  262.  
  263. #define FLAT_SPHERE        0 
  264. #define LIGT_SPHERE        1 
  265. #define TEXX_SPHERE        2 
  266. #define FRAC_PLANET        3 
  267. #define ELEV_PLANET        4 
  268. #define FRAC_RINGWO        5 
  269. #define ELEV_RINGWO        6 
  270.  
  271. typedef struct  { flot32 s,t     ; }  T2 ;
  272. typedef struct  { flot32 x,y,z   ; }  P3 ;
  273. typedef struct  { flot64 x,y,z   ; }  D3 ;
  274. typedef struct  { flot32 x,y,z,w ; }  P4 ;
  275. typedef struct  { flot32 r,g,b   ; }  C3 ;
  276. typedef struct  { flot32 x,y,z   ; }  V3 ;
  277. typedef struct  { flot32 x,y,z,w ; }  V4 ;
  278. typedef struct  { flot32 r,g,b,a ; }  C4 ;
  279.  
  280. typedef struct {
  281.         T2 t ;
  282.         flot32 a,b ;
  283.         V3 n ;
  284.         flot32 c ;
  285.         P3 p ;
  286.         flot32 d ;
  287. } P8 ;
  288.  
  289. typedef struct  {                 /*-- 32 BYTES --*/
  290.         P3     plan ;
  291.         flot32 delta ;
  292.         uint32 seed ;
  293.         sint32 label ;
  294.         uint32 cpack1,cpack2 ;
  295. } TrigPoint ;
  296.  
  297. typedef struct  { 
  298.         sint32 x1,y1,x2,y2 ;
  299.         uint32 butt ;
  300.         uint32 mask ;
  301.         uint32 col ;
  302.         char   mes0[128] ;
  303.         char   mes1[128] ;
  304.         char   mes2[128] ;
  305. } t_menu ;
  306.  
  307. typedef struct  { 
  308.         flot32  x,y,z ;
  309.         sint32  count ;
  310.         sint32  index[40] ;
  311.         char    name[32] ;
  312. } t_bordr ;
  313.  
  314. typedef struct  { 
  315.         P4      arr[512] ;
  316.         sint32  arr_count ;
  317.         sint32  brd_count ;
  318.         t_bordr brd[90] ;
  319. } t_const ;
  320.  
  321. typedef struct {
  322.     char   name[32] ;
  323.     flot32 orb ;
  324.     flot32 ecc ;
  325.     flot32 inc ;
  326.     flot32 rad ;
  327.     flot64 mas ;
  328.     flot32 apo ;
  329.     flot32 yer ;
  330.     flot32 day ;
  331.     flot32 ee ;
  332.     flot32 ww ;
  333.     flot32 omega ;
  334.     flot32 r1,r2 ;
  335.     char   ring[32] ;
  336.  
  337.     uint32 col ;
  338.     uint32 tess ;
  339.     uint32 texsz ;
  340.         flot32 scale ;
  341.         sint32 lxsize,lysize ;
  342.         sint32 lformat ;
  343.     char   elev[32] ;
  344.         sint32 cxsize,cysize ;
  345.         sint32 cformat ;
  346.     char   colr[32] ;
  347.  
  348.     sint32 moon_count ;
  349.     void   *moons ;
  350. } t_system ;
  351.  
  352. typedef struct t_body {
  353.    t_system  *ptr ;
  354.    D3        posit ;
  355.    flot32    distan ;
  356.    flot32    angsiz ;
  357.    flot32    orbsiz ;
  358.    flot32    cliprad ;
  359.    sint32    color ;
  360.    sint32    texdf ;
  361.    sint32    texrn ;
  362.    sint32    bodyobj[3] ;
  363.    sint32    orbtobj[3] ;
  364.    sint32    ringobj[3] ;
  365.    char      *land ;
  366.    char      *colr ;
  367.    void      *next[32] ;
  368. } t_body ;
  369.  
  370. typedef struct  {
  371.    sint32  plan_current,plan_old ;
  372.    sint32  moon_current,moon_old ;
  373.    sint32  suun_current,suun_old ;
  374.    sint32  suncount;
  375.    t_body  star[2];
  376.    t_body  stat ;     /* cheap space station */
  377.    t_body  freedom ;  /* space station freedom */
  378. } t_boss;
  379.  
  380. typedef struct  {            /*--- 48 Bytes ---*/
  381.     flot32   x,y,z,abs_mag;
  382.     flot32   r,g,b,a;
  383.     flot32   scass,fny_mag;
  384.     flot32   abs_mag2,scass2;
  385. } t_stars ;
  386.  
  387. typedef struct  {
  388.    sint32  count ;
  389.    t_stars *stars;
  390. } t_galaga;
  391.  
  392. typedef struct  {
  393.     D3       p1 ;
  394.     V3       v1 ;
  395.     flot64   t1 ;
  396.     D3       p2 ;
  397.     V3       v2 ;
  398.     flot64   t2 ;
  399.     sint32   newstar[3] ;
  400. } t_spline ;
  401.  
  402. typedef struct  {
  403.         t_wndw winst;
  404.  
  405.         sint32 shmid ;
  406.         sint32 *shmad ;
  407.         sint32 mouse_x,mouse_y,mouse_b,mouse_n;
  408.         sint32 rotsizex,rotsizey ;
  409.         sint32 winsizex,winsizey ;
  410.         sint32 winorigx,winorigy ;
  411.         sint32 x,y,z ;
  412.         flot32 cutoff ;
  413.         flot32 fps ;
  414.         sint32 stars_per_square ;
  415.  
  416.         sint32 hw_graphics ;
  417.         uint32 alpha ;
  418.  
  419. #ifdef SP_IRIS_GL
  420.         uint32 sky_clear_color ;
  421. #endif
  422. #ifdef SP_OPEN_GL
  423.         sint32 fontbase;
  424.         flot32 sky_clear_color[4] ;
  425. #endif
  426.  
  427.         uint32 infoco ;
  428.         uint32 flags ;
  429.         flot32 feclipse ;
  430.         flot32 skyfrac ;
  431.         flot32 acdx,acdy ;
  432.         uint32 status ;
  433.         sint32 star_current ;
  434.         sint32 corona,galaxy,galobj[2],starobj,locun ;
  435.         sint32 constobj ;
  436.         sint32 shadowsqobj ;
  437.         sint32 noroll,attach ;
  438.         sint32 proj_count ;
  439.  
  440.         D3     eye ;
  441.         V3     enorm ;
  442.         V3     vnorm ;
  443.         V3     light_vector ;
  444.         flot32 light_angle ;
  445.         flot32 viewangle,aspcratio,fov ;
  446.         flot32 timacc ;
  447.         flot64 D ;
  448.         flot64 S ;
  449.  
  450.         sint32 click ;
  451.         flot32 timer,timer_old ;
  452.  
  453.         char   date[64] ;
  454.  
  455.         Matrix mat ;
  456.         t_spline spline ;
  457.         V4     clop[NUM_CLIP_PLANES] ;
  458. } t_stopwatch ;
  459.  
  460. /*************************** objects.c *****************************/
  461.        sint32   object_space_station(sint32) ;
  462. static void     make_toroid(flot32,flot32,sint32) ;
  463. static void     make_cylind(flot32,flot32,sint32,sint32) ;
  464.        void     object_planet_orbit(t_body *,flot32) ;
  465.        sint32   object_planet_rings(t_system *,sint32) ;
  466.        sint32   object_shadow_squares(void);
  467.        sint32   make_constellations(void);
  468.  
  469. /***************************** watch.c *****************************/
  470.        flot64   check_timer(void) ;
  471.        flot64   delta_timer(void) ;
  472.        void     reverse_julian_date(flot64,char *) ;
  473.  
  474. /***************************** main.c ******************************/
  475. static void     initialize_graphics(void) ;
  476. static void     fly(void) ;
  477. static void     print_screen_text(flot32) ;
  478. static void     blur_galaxy(uint32 [256][256]) ;
  479.        sint32   make_galaxy_object(sint32) ;
  480.        void     set_window_view(flot32 vian) ;
  481. static void     print_opening_credit(void) ;
  482.        char    *datatrail(char *) ;
  483.  
  484. /****************************** god.c ******************************/
  485.        t_system *create_solar_system(sint32,t_boss *,t_galaga *) ;
  486.        void     destroy_solar_system(t_boss *) ;
  487.        void     scan_star_system(t_boss *) ;
  488. static void     create_one(t_body *,flot32) ;
  489. static void     destroy_one(t_body *) ;
  490.        void     p_t_syst(t_system *) ;
  491.        void     p_t_body(t_body *) ;
  492.        void     p_t_boss(t_boss *) ;
  493. static void     generate_solar_system(t_boss *,sint32,t_stars *) ;
  494. static uint32   generate_full_color(void) ;
  495. static sint32   do_da_eclipse(t_boss *,D3 *,flot32) ;
  496. static t_system *generate_ringworld_system(sint32,t_stars *) ;
  497.        void     star_params(t_stars *,flot32 *,flot32 *,flot64 *) ;
  498. static flot64   newton(flot64,flot64) ;
  499.        flot32   float_rand(void) ;
  500.        void     calculate_orbital_params(D3 *,flot32 GMm,t_system *) ;
  501.  
  502. /***************************** sols.c ******************************/
  503.        void     actually_do_graphics(t_boss *) ;
  504. static void     display_stellar_background(t_boss *) ;
  505. static void     display_galactic_background(void) ;
  506. static void     display_cosmic_background(void) ;
  507. static void     display_foreground(t_boss *) ;
  508. static void     display_ringworld_foreground(t_boss *);
  509. static void     draw_me(t_body *,t_boss *) ;
  510. static sint32   sphere_clipp(D3 *,flot32) ;
  511. static void     prepare_for_fractal_planet(t_boss *,sint32) ;
  512.        void     calc_posit(D3 *,t_system *,D3 *,flot32) ;
  513. static void     polyline_orbits(t_boss *) ;
  514. static void     calculate_luna(D3 *,D3 *) ;
  515.        sint32   find_closest_star(sint32 *,t_galaga *) ;
  516. static void     display_star_names(void) ;
  517. static void     total_solar_eclipse(t_boss *) ;
  518. static void     prepare_for_fractal_ringworld(t_boss *,sint32) ;
  519.        void     draw_all_them_stars(sint32) ;
  520. static void     read_data_file(t_body *) ;
  521. static void     stall_message(char *,flot32,flot32) ;
  522. static void     special_perspective(flot32,flot32) ;
  523. static void     print_sub_geosphere_credit(void) ;
  524.        void    accumulation(t_boss *flaggs);
  525.  
  526. /**************************** fract.c ******************************/
  527.        void     generate_fractsphere(sint32,sint32) ;
  528.        void     display_fractsphere(void) ;
  529.        void     destroy_fractsphere(void) ;
  530.  
  531. /**************************  ringworld.c  **************************/
  532.        void     generate_ringworld(sint32,sint32) ;
  533.        void     display_ringworld(void) ;
  534.        void     destroy_ringworld(void) ;
  535.  
  536. /**************************** world.c ******************************/
  537. static void     world_mid(sint32,sint32,sint32,sint32) ;
  538.        sint32   generate_sphere(sint32,sint32,sint32) ;
  539.  
  540. /*************************** events.c ******************************/
  541.        uint32   spOpenWindow(void);
  542.        void     spGetWindowGeometry(void);
  543.        uint32   spInitFont(char *);
  544.        void     spDrawString(float,float,float,char *);
  545.        void     spInitKeyboard(void);
  546.        void     spReadEvents(t_boss *);
  547.        void     spInitSpaceball(void);
  548.        void     spReadSpaceball(t_boss *);
  549.        void     spInitCursor(void);
  550.        void     spInitBell(void);
  551.        void     spRingBell(void);
  552.        void     spWaitForLeftButton(void);
  553.        void     spSwapBuffers(void);
  554.        void     spIdentifyMachine(void);
  555.        flot32   spReadFloat(void);
  556.        sint32   spReadStar(sint32 [3]);
  557.  
  558. /**************************** input.c ******************************/
  559.        void     initialize_time(void) ;
  560.        void     initialize_shmem(t_boss *) ;
  561.        void     read_time(void) ;
  562.        void     matrix_mouse(t_boss *) ;
  563.        void     read_spaceball(t_boss *) ;
  564.        void     key_press(t_boss *,sint32) ;
  565. static void     el_cheato(t_boss *,sint32,Matrix) ;
  566. static void     take_me_there(t_spline *) ;
  567.        void     scan_galactic_system(t_boss *) ;
  568. static void     init_stars(void) ;
  569. static sint32   init_cnstl(void) ;
  570. static void     generate_star_squares() ;
  571. static void     destroy_star_square(t_stars *) ;
  572.        void     star_square_clip_check(sint32 [4],sint32 [18][18],P3 *) ;
  573. static sint32   generate_galaxy_stars(void) ;
  574.        void     sound_control(sint32,sint32) ;
  575. static void     stats_menu_stuff(t_boss *);
  576. static sint32   autopilot_menu_stuff(t_boss *);
  577.  
  578. /**************************** menu.c ******************************/
  579.        void     draw_menu(void) ;
  580.        void     check_menu(t_boss *) ;
  581.        void     draw_item(sint32,t_menu *) ;
  582.        void     draw2_menu(sint32,t_menu *) ;
  583.        sint32   check2_menu(sint32,t_menu *) ;
  584.        void make_new_item(t_menu *,sint32,uint32,char *) ;
  585.  
  586. /************************** matrix.c ******************************/
  587.        void     spMultMatrix(flot32 *,flot32 *,flot32 *);
  588.        void     spTranMatrix(flot32 *,flot32 *);
  589.        void     spCopyMatrix(flot32 *,flot32 *);
  590.        void     spLookMatrix(flot32,flot32,flot32,flot32,flot32,flot32,Matrix);
  591.        void     spPerspMatrix(flot32,flot32);
  592.  
  593. /************************** light.c ******************************/
  594.        void     spInitLight(void);
  595.        void     spLightMaterial(uint32,uint32);
  596.        void     spSetLight(V3 *);
  597.  
  598. /************************* texture.c *****************************/
  599.        void     spTevDef(void);
  600.        uint32   spTexDef(uint32,uint32,uint32,void *,uint32 flag);
  601.        void     spFlipTex(uint32,uint32);
  602.  
  603. /*************************** sound.c ******************************/
  604.        void     sound_effect(char *) ;
  605. static void     play_file(void) ;
  606. static void     play_sample(uint32) ;
  607. static void     reverse_buffer(unsigned char *) ;
  608.  
  609.